import { defineStore } from "pinia";
// 导入用户接口和方法
import { getJsonByNameAPI } from "@/api/community";
// 用户数据获取
const useCommunityStore = defineStore("Community", {
  state: () => {
    return {
      communityBase: <any>{},
    };
  },
  // 异步请求
  actions: {
    /** 社区基本信息 */
    async getcommunityBase(jsonName: string) {
        const result=await getJsonByNameAPI(jsonName);
        this.communityBase = result.data
        return result.data
    },
  },
  getters: {},
});
export default useCommunityStore;
